import { FormSchema } from "/@/components/Form";
import { DescItem } from "/@/components/Description";
import { defaultDescRender } from "/@/hooks/core/useDefault";
import { BasicColumn } from "/@/components/Table/src/types/table";

export const descSchema: DescItem[] = [
  {
    field: "collegeCode",
    label: "学院编号",
    contentMinWidth: 300,
  },
  {
    field: "collegeName",
    label: "学院名称",
  },
  {
    field: "leader",
    label: "学院负责人",
    render: defaultDescRender,
  },
  {
    field: "email",
    label: "学院邮箱",
    render: defaultDescRender,
  },
  {
    field: "phone",
    label: "学院电话",
    render: defaultDescRender,
  },
];

export const formSchemas: FormSchema[] = [
  {
    field: "collegeId",
    label: "学院主键",
    component: "InputNumber",
    show: false,
  },
  {
    field: "collegeCode",
    label: "学院编号",
    component: "InputNumber",
    required: true,
  },
  {
    field: "collegeName",
    label: "学院名称",
    component: "Input",
    required: true,
  },
  {
    field: "leader",
    label: "学院负责人",
    component: "Input",
  },
  {
    field: "email",
    label: "学院邮箱",
    component: "Input",
  },
  {
    field: "phone",
    label: "学院电话",
    component: "Input",
  },
];

export const basicColums: BasicColumn[] = [
  {
    title: "学院主键",
    dataIndex: "collegeId",
    ifShow: false,
  },
  {
    title: "学院编号",
    dataIndex: "collegeCode",
    sorter: true,
  },
  {
    title: "学院名称",
    dataIndex: "collegeName",
  },
];
